home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Emphatic 1
/
Emphatic_1_1996_Nitros.d64
/
src.$a9 ifli_zzr
< prev
next >
Wrap
Text File
|
2023-02-26
|
3KB
|
122 lines
;---------------------------------------
;$A9 IFLI Displayer (Funpaint II format)
;Coded by ZZR/Nitros/Virus/Nofx
;This is the worlds smallest IFLI
;displayer! The routine is only usable
;for pic displaying, in a demo it would
;need an exact timing interupt because
;music and key pressing stuffs up the
;timing.
;It is possible te shorten it to about
;$99 bytes by putting it on zero page
;and by doing some other changes, but
;whats the use! Anyway it is full
;relocatable and very small!
;---------------------------------------
*= $2000
ldx #$03
ldy #$00
sty $d021 ;Screen color
get lda $8000,y;Normal color ram
put sta $d800,y
iny
bne get
inc get+2
inc put+2
dex
bpl get
sei ;interupt setup
ldx #$2f
stx $dc0d
stx $d01a
stx $d012
lda #<irq
ldy #>irq
sta $0314
sty $0315
cli
bvc *
;---------------------------------------
irq lda #$38 ;Interlace $d016
sta $d016
eor #$01
sta irq+1
bank lda #$02 ;Interlace Vic bank
sta $dd00
eor #$02
sta bank+1
;---------------------------------------
.byte $ab,$38
;OAL/LAX - I have a page out of a Vic 20
;(6502) programming book (i only have 1
;page, so i don't know what it's
;called!), and it lists the illegal
;opcode $ab as OAL (ORA the accumulator
;with #$ee, AND with data and TAX). I
;think it works different on C64 (6510)
;because it just seems to LDA and LDX.
;It might bug in certain ranges (i am
;not sure), anyway it works ok in this
;situation.
;---------------------------------------
loop ldy #$08
sty $d018
sta $d011
cmp ($c6,x);11 cycle timing
dec $c6 ;pause in 4 bytes!
ldy #$18
sty $d018
inc $d011
cmp ($c6,x)
dec $c6
ldy #$28
sty $d018
inc $d011
jsr $ff40 ;12 cycle pause in
;3 bytes.
sta $cff0,y ;extra cycle + $28
inc $d011 ;which makes the
cmp ($c6,x) ;pause 13 cycles,
dec $c6 ;and stores #$38
;in $d018.
ldy #$48
sty $d018
inc $d011
cmp ($c6,x)
dec $c6
ldy #$58
sty $d018
inc $d011
cmp ($c6,x)
dec $c6
ldy #$68
sty $d018
inc $d011
cmp ($c6,x)
dec $c6
ldy #$78
sty $d018
inc $d011
dec $d019
dex
bpl loop
jmp $ea81